_NNNN_OOOO_TTTT_EEEE_:::: When the environment variable ______XXXX_PPPP_GGGG is a value greater than 0
(zero), _llll_eeee_xxxx execs the POSIX compliant _////_uuuu_ssss_rrrr_////_bbbb_iiii_nnnn_////_ffff_llll_eeee_xxxx.
The _llll_eeee_xxxx command generates programs to be used in simple lexical analysis
of text. The input _f_i_l_es (standard input default) contain strings and
expressions to be searched for and C text to be executed when these
strings are found. _llll_eeee_xxxx processes supplementary code set characters in
program comments and strings, and single-byte supplementary code set
characters in tokens, according to the locale specified in the _LLLL_CCCC______CCCC_TTTT_YYYY_PPPP_EEEE
environment variable [see _LLLL_AAAA_NNNN_GGGG on _eeee_nnnn_vvvv_iiii_rrrr_oooo_nnnn(5)].
_llll_eeee_xxxx generates a file named _llll_eeee_xxxx_...._yyyy_yyyy_...._cccc. When _llll_eeee_xxxx_...._yyyy_yyyy_...._cccc is compiled and
linked with the lex library (_////_uuuu_ssss_rrrr_////_llll_iiii_bbbb_////_llll_iiii_bbbb_llll_...._aaaa), it copies the input to the
output except when a string specified in the file is found. When a
specified string is found, then the corresponding program text is
executed. The actual string matched is left in _yyyy_yyyy_tttt_eeee_xxxx_tttt, an external
character array. Matching is done in order of the patterns in the _f_i_l_e.
The patterns may contain square brackets to indicate character classes,
as in _[[[[_aaaa_bbbb_xxxx_----_zzzz_]]]] to indicate _aaaa, _bbbb, _xxxx, _yyyy, and _zzzz; and the operators _****, _++++, and
_???? mean, respectively, any non-negative number of, any positive number
of, and either zero or one occurrence of, the previous character or
character class. Thus, _[[[[_aaaa_----_zzzz_AAAA_----_ZZZZ_]]]]_++++ matches a string of letters. The
character _.... is the class of all characters except new-line. Parentheses
for grouping and vertical bar for alternation are also supported. The
notation _r_{{{{_d_,,,,_e_}}}} in a rule indicates between _d and _e instances of regular
expression _r. It has higher precedence than |, but lower than *, ?, +,
and concatenation. The character _^^^^ at the beginning of an expression
permits a successful match only immediately after a new-line, and the
character _$$$$ at the end of an expression requires a trailing new-line.
The character _//// in an expression indicates trailing context; only the
part of the expression up to the slash is returned in _yyyy_yyyy_tttt_eeee_xxxx_tttt, but the
remainder of the expression must follow in the input stream. An operator
character may be used as an ordinary symbol if it is within _"""" symbols or
preceded by _\\\\.
Three macros are expected: _iiii_nnnn_pppp_uuuu_tttt to read a character; _uuuu_nnnn_pppp_uuuu_tttt_((((_c_)))) to
replace a character read; and _oooo_uuuu_tttt_pppp_uuuu_tttt_((((_c_)))) to place an output character.
They are defined in terms of the standard streams, but you can override
them. The program generated is named _yyyy_yyyy_llll_eeee_xxxx, and the lex library contains
a _mmmm_aaaa_iiii_nnnn that calls it. The macros _iiii_nnnn_pppp_uuuu_tttt and _oooo_uuuu_tttt_pppp_uuuu_tttt read from and write to
_ssss_tttt_dddd_iiii_nnnn and _ssss_tttt_dddd_oooo_uuuu_tttt, respectively.
The function _yyyy_yyyy_mmmm_oooo_rrrr_eeee accumulates additional characters into the same
_yyyy_yyyy_tttt_eeee_xxxx_tttt. The function _yyyy_yyyy_llll_eeee_ssss_ssss_((((_n_)))) pushes back _yyyy_yyyy_llll_eeee_nnnn_gggg -_n characters into the
input stream. (_yyyy_yyyy_llll_eeee_nnnn_gggg is an external _llll_oooo_nnnn_gggg _iiii_nnnn_tttt variable giving the length
PPPPaaaaggggeeee 1111
lllleeeexxxx((((1111)))) lllleeeexxxx((((1111))))
in bytes of _yyyy_yyyy_tttt_eeee_xxxx_tttt.) The function _yyyy_yyyy_wwww_rrrr_aaaa_pppp is called whenever the scanner
reaches end of file and indicates whether normal wrapup should continue.
The action _RRRR_EEEE_JJJJ_EEEE_CCCC_TTTT on the right side of the rule causes the match to be
rejected and the next suitable match executed. The action _EEEE_CCCC_HHHH_OOOO on the
right side of the rule is equivalent to _pppp_rrrr_iiii_nnnn_tttt_ffff_((((_""""_%%%%_ssss_""""_,,,, _yyyy_yyyy_tttt_eeee_xxxx_tttt_)))).
Any line beginning with a blank is assumed to contain only C text and is
copied; if it precedes _%%%%_%%%%, it is copied into the external definition area
of the _llll_eeee_xxxx_...._yyyy_yyyy_...._cccc file. All rules should follow a _%%%%_%%%%, as in _yyyy_aaaa_cccc_cccc. Lines
preceding _%%%%_%%%% that begin with a non-blank character define the string on
the left to be the remainder of the line; it can be called out later by
surrounding it with _{{{{_}}}}. In this section, C code (and preprocessor
statements) can also be included between _%%%%_{{{{ and _%%%%_}}}}. Note that curly
brackets do not imply parentheses; only string substitution is done.
The external names generated by _llll_eeee_xxxx all begin with the prefix _yyyy_yyyy or _YYYY_YYYY.
The flags must appear before any files.
_----_cccc Indicates C actions and is the default.
_----_tttt Causes the _llll_eeee_xxxx_...._yyyy_yyyy_...._cccc program to be written instead to standard
output.
_----_vvvv Provides a two-line summary of statistics.
_----_nnnn Will not print out the _----_vvvv summary.
_----_VVVV Print out version information on standard error.
_----_QQQQ_[[[[_yyyy_||||_nnnn_]]]] Print out version information to output file _llll_eeee_xxxx_...._yyyy_yyyy_...._cccc by using
_----_QQQQ_yyyy. The _----_QQQQ_nnnn option does not print out version information and
is the default.
Multiple files are treated as a single file. If no files are specified,
standard input is used.
Certain default table sizes are too small for some users. The table
sizes for the resulting finite state machine can be set in the
definitions section:
_%%%%_pppp _n number of positions is _n (default 20000)
_%%%%_nnnn _n number of states is _n (4000)
_%%%%_eeee _n number of parse tree nodes is _n (8000)
_%%%%_aaaa _n number of transitions is _n (16000)
_%%%%_kkkk _n number of packed character classes is _n (20000)
PPPPaaaaggggeeee 2222
lllleeeexxxx((((1111)))) lllleeeexxxx((((1111))))
_%%%%_oooo _n size of output array is _n (24000)
The use of one or more of the above automatically implies the _----_vvvv option,